In modern communication and control systems, different fieldbus systems can be used for data transmission or for control purposes, which often have to be coupled to each other, and in this case a distinction can be made between a higher-level bus system and a lower-level bus system. The higher-level bus system is the bus system that is connected to a control system. The lower-level bus system, on the other hand, is the bus system that has to be coupled to the higher-level bus system. In this context, the problem arises of transferring or transmitting data from one bus system to the other bus system without time loss as far as possible. Moreover, portions of the data such as header information typically have to be altered according to predefined rules in order to ensure compatibility of the data of one bus system for the respective other bus system. The rules for altering the data are often processed by a permanently installed software, sometimes also by a hardwired hardware, to provide for particularly efficient data transfer. However, this leads to limited flexibility in data processing.
DE 10 2010 020 446 B4 discloses an automation appliance having means for converting the data packets coming from a fieldbus into a data stream for a local bus and for converting the data stream directed from the local bus to the automation appliance into data packets for the fieldbus. The automation appliance has an acceleration unit for selecting process data that are to be converted in accelerated fashion and for separately converting the selected process data, which is configured such that the selected process data are output at an earlier time than non-selected process data which are transmitted as well in combination with the selected process data. For this purpose, the automation appliance is configured in conventional manner for processing the non-selected process data using software on a microcontroller, while the selected process data are processed by hardware logic. In the latter case, data processing is carried out according to fixed predefined rules.
DE 10 2008 019 277 B4, which is hereby incorporated by reference as an intellectual property right of the same applicant as of the present patent application, discloses a data transmission device for transmitting data between a first bus system and a second bus system without using a processor after initialization of respective memories, comprising a copy table for providing a rearranged output sequence of data of the first bus system, and a hard-wired or hard-coded transmission device for transmitting the data between the first bus system and the second bus system according to the rearranged output sequence. Although data processing is particularly efficient with this hardware-based transmission concept, it can still be enhanced in terms of flexibility.
The object of the present invention is to provide an efficient and at the same time flexible and modular concept for modifying data when coupling two bus systems.
This object is achieved by the subject-matter of the independent claims. Advantageous embodiments are specified by the dependent claims.
According to the invention, a device is provided for coupling a first bus system to a second bus system, which is configured to provide for bidirectional communication between the first bus system and the second bus system.
The coupling device comprises data transfer means for transmitting data from the first bus system to the second bus system, which will be referred to as forward-directed data below, and for transmitting data from the second bus system to the first bus system, which will be referred to as backward-directed data below.
Furthermore, the coupling device comprises data manipulation means for manipulating forward-directed data and/or backward-directed data, and an instruction memory for storing manipulation instructions relating to the manipulation of data by the data manipulation means.
The data transfer means and the data manipulation means may be included in a hardware unit.
It is now intended that the manipulation instructions can be reloaded into the instruction memory in a modular manner, for instance by a user of the device. This provides for a particularly high degree of flexibility with regard to the manipulation of the data.
For example, the manipulation instructions may be preset by the factory, and may be modifiable by the user. For example, an update mechanism may be provided. Also, provisions may be made so that at least portions of the manipulation instructions are replaceable at a later time. For example, it may be possible for a user to reload flexible program code. It may be possible to flexibly reload apps (applications).
Thus, a possibility is for instance created for loading, into the coupling device, applications for data processing as reloadable functions, so-called apps. Functions that can be implemented, for example, include counter functions, reflex functions (different input states lead to a specific output state), time stamping or oversampling of process data with data from standard fieldbus modules, event evaluation, control functions, etc.
The flexible reloading can be made possible through an interface that is dedicated for this purpose, for example.
The bus coupler may for instance comprise a hardware unit that allows to load flexible program code into the hardware unit, which can then be executed. The hardware unit preferably has access to (process) data and is capable of selectively manipulating or extending them. In this way, it is possible to advantageously implement various functions which can be reloaded in the form of program code without interfering with the other operation of the bus coupler.
The processed (process) data may, for example, be transmitted to the higher-level fieldbus as new data, e.g. as a new module, or may else be output directly to a connected field bus subscriber.
For example, (process) data exchange may always take place in special hardware components that do not influence the response times of the (process) data exchanger. The bus coupler is thus capable of processing (process) data without disturbing or slowing down the normal (process) data exchange or affecting the response times of the bus coupler.
For example, provisions may be made for using hardware components which ensure that the data flow does not depend on processors. It is also conceivable that the coupling device, in particular the hardware unit, comprises a dedicated processor which is responsible for the execution of reloaded manipulation instructions.
In this manner, it is avoided that (process) data are processed by the or an already existing processor which already has to process the handling of the usual tasks in a bus coupler and therefore would not always be able to process the new tasks quickly and without delay.
In principle, it is also possible to reload the functions or apps into specific FPGA designs (FPGA: Field Programmable Gate Array, i.e. (logic) gate arrays that are programmable in the field, i.e. on site at the customer), which will then provide the additional functions. Different functional designs can be offered in the FPGA for this purpose, which can then be loaded into the bus coupler via an update mechanism. Each FPGA design may provide special functions.
On the other hand, however, the variant which allows to load flexible program code into the bus coupler is more universal.
According to one embodiment of the invention, the coupling device comprises instruction execution means for executing the manipulation instructions and generating manipulation data, and a manipulation data buffer for buffering generated manipulation data for the data manipulation means.
The instruction execution means and/or the manipulation data buffer may be included in the hardware unit. The instruction execution means may, for example, be implemented as an FPGA and/or as a processor. The instruction execution means may be provided exclusively for executing the manipulation instructions.
Furthermore, in this embodiment, the data manipulation means is adapted to link the manipulation data buffered in the manipulation data buffer with forward-directed and/or backward-directed data, to overwrite at least portions of forward-directed and/or backward-directed data with manipulation data. It is, for example, also possible for manipulation data to be prepended or appended to the data.
According to one embodiment of the invention, the manipulation instructions relate to forward-directed and/or backward-directed data. Accordingly, in this embodiment, the instruction execution means is adapted to access the relevant forward-directed and/or backward-directed data to execute the related manipulation instructions.
It may be contemplated that the manipulation instructions relate to current data from the last cycle of the higher-level bus system, for example.
However, it may furthermore be contemplated, for example, that the manipulation instructions relate to forward-directed and/or backward-directed data from a previous point in time, e.g. data from a previous bus cycle. This can be enabled, for example, by placing data in a multiple (e.g. triple) swap buffer.
According to one embodiment of the invention, the coupling device comprises an output data buffer associated with the first bus system for buffering forward-directed data, and an input data buffer associated with the first bus system for buffering backward-directed data. The two buffers are directly linked with the higher-level bus and capable of buffering process data, for example.
Furthermore, in this embodiment, the data transfer means and/or the data manipulation means are configured to access the output buffer and/or the input buffer to transmit or manipulate forward-directed and/or backward-directed data.
The output data buffer and/or the input data buffer may be included in the hardware unit.